﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[usp_Delete_Request]
	@ID uniqueidentifier
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	
	DECLARE @ErrorCode int;
	SET @ErrorCode = 0;
    
	DELETE FROM EndPoints
	WHERE ID = @ID
	
	SET @ErrorCode = @@Error;

	IF (@ErrorCode <> 0) GOTO ERROR_HANDLER;
	
	RETURN 0;

ERROR_HANDLER:
IF (@ErrorCode <> 0)
BEGIN
	RETURN 1
END	

END
